package com.itheima.d04_duotai_quickstart;

/**
 * 目标：认识多态
 *      形式一：对象多态
 *      形式二：行为多态
 */
public class Test {

    public static void main(String[] args) {
        //形式一：对象多态
        // 父类   =   子类对象
        Animal a = new Cat("小花猫",2,"公猫") /*new Dog("小花狗",3,"母狗")*/;
        a.eat();
        System.out.println(a);
    }
}
